**************************************************************************
***********************Overdose Death Analysis****************************
**************************************************************************

cd "/Users/clj65/BYU Law Dropbox/Cree Jones/My Mac (422-JONESC-20)/Documents/1 Research/16 Decriminalization and Death/Clean Files/"

clear
use deathdata_2018-2025_clean.dta

*************************************************
********Creating Figures: Overdose Deaths********
*************************************************

*****Figure 2: All control counties pretrend*****

collapse (mean) deathsperhundredthousand, by(year_month treat)

graph twoway (connected deathsperhundredthousand year_month if treat==1 & year_month<2021.1, color(black) lcolor(black) msize(vsmall) msymbol(circle)) ///
(connected deathsperhundredthousand year_month if treat==0 & year_month<2021.1, lcolor(green) lpattern(dash) color(green) msize(vsmall) msymbol(square)) ///
(connected deathsperhundredthousand year_month if treat==1 & year_month>2021.083, color(black%10) lcolor(black%10) msize(vsmall) msymbol(circle)) ///
(connected deathsperhundredthousand year_month if treat==0 & year_month>2021.083, lcolor(green%10) lpattern(dash) color(green%10) msize(vsmall) msymbol(square)) ///
(scatteri 0 2021.083 10 2021.083, recast(line) lpattern(solid) lcolor(black) msymbol(i)), ///
graphregion(color(white)) ylabel(,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(1 "Mulnomah County, OR" 2 "Control Counties") position(6) cols(2))

graph export Figure2_death_pretrend.jpg, replace

*****Figure 5: All control counties pretrend post1*****

generate upper = 10
graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(connected deathsperhundredthousand year_month if treat==1 & year_month<2024.7, color(black) lcolor(black) msize(vsmall) msymbol(circle)) ///
(connected deathsperhundredthousand year_month if treat==0 & year_month<2024.7, lcolor(green) lpattern(dash) color(green) msize(vsmall) msymbol(square)) ///
(connected deathsperhundredthousand year_month if treat==1 & year_month>2024.6, color(black%10) lcolor(black%10) msize(vsmall) msymbol(circle)) ///
(connected deathsperhundredthousand year_month if treat==0 & year_month>2024.6, lcolor(green%10) lpattern(dash) color(green%10) msize(vsmall) msymbol(square)), ///
graphregion(color(white)) ylabel(0(2)10,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(2 "Mulnomah County, OR" 1 "Decriminalization" 3 "Control Counties") position(6) cols(2))

graph export Figure5_death_post1.jpg, replace

*****Figure 6: All Control Counties Pretrend Post1 Post2*****

graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.167), bcolor(gs11) base(0)) ///
(connected deathsperhundredthousand year_month if treat==1, color(black) lcolor(black) msize(vsmall) msymbol(circle)) ///
(connected deathsperhundredthousand year_month if treat==0, lcolor(green) lpattern(dash) color(green) msize(vsmall) msymbol(square)), ///
graphregion(color(white)) ylabel(0(2)10,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(3 "Mulnomah County, OR" 1 "Decriminalization" 4 "Control Counties" 2 "Recriminalization") position(6) cols(2))

graph export Figure6_death_post1_2.jpg, replace

*****Figure A1: clark county, nv*****
clear
use deathdata_2018-2025_clean.dta

graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.167), bcolor(gs11) base(0)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Multnomah County, OR", lpattern(solid) color(black) msize(vsmall)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Clark County, NV", lpattern(dash) color(green) msize(vsmall)), ///
graphregion(color(white)) ylabel(,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(1 "Decriminalization" 3 "Mulnomah County, OR" 2 "Recriminalization" 4 "Clark County, NV") position(6) cols(2))

graph export FigureA1_multnomah_clark_pop_adjust.jpg, replace

*****Figure A2: denver county, co*****
graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.167), bcolor(gs11) base(0)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Multnomah County, OR", lpattern(solid) color(black) msize(vsmall)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Denver County, CO", lpattern(dash) color(green) msize(vsmall)), ///
graphregion(color(white)) ylabel(,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(1 "Decriminalization" 3 "Mulnomah County, OR" 2 "Recriminalization" 4 "Denver County, CO") position(6) cols(2))

graph export FigureA2_multnomah_denver_pop_adjust.jpg, replace

*****Figure A3: los angeles county, ca*****
graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.167), bcolor(gs11) base(0)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Multnomah County, OR", lpattern(solid) color(black) msize(vsmall)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Los Angeles County, CA", lpattern(dash) color(green) msize(vsmall)), ///
graphregion(color(white)) ylabel(,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(1 "Decriminalization" 3 "Mulnomah County, OR" 2 "Recriminalization" 4 "Los Angeles County, CA") position(6) cols(2))

graph export FigureA3_multnomah_losangeles_pop_adjust.jpg, replace

*****Figure A4: maricopa county, az*****
graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.167), bcolor(gs11) base(0)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Multnomah County, OR", lpattern(solid) color(black) msize(vsmall)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Maricopa County, AZ", lpattern(dash) color(green) msize(vsmall)), ///
graphregion(color(white)) ylabel(,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(1 "Decriminalization" 3 "Mulnomah County, OR" 2 "Recriminalization" 4 "Maricopa County, AZ") position(6) cols(2))

graph export FigureA4_multnomah_maricopa_pop_adjust.jpg, replace

*****Figure A5: sacramento county, ca*****
graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.167), bcolor(gs11) base(0)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Multnomah County, OR", lpattern(solid) color(black) msize(vsmall)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Sacramento County, CA", lpattern(dash) color(green) msize(vsmall)), ///
graphregion(color(white)) ylabel(,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(1 "Decriminalization" 3 "Mulnomah County, OR" 2 "Recriminalization" 4 "Sacramento County, CA") position(6) cols(2))

graph export FigureA5_multnomah_sacramento_pop_adjust.jpg, replace

*****Figure A6: salt lake county, ut*****
graph twoway (area upper year_month if inrange(year_month, 2021.083, 2024.7), bcolor(gs14) base(0)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.167), bcolor(gs11) base(0)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Multnomah County, OR", lpattern(solid) color(black) msize(vsmall)) ///
(connected deathsperhundredthousand year_month if occurrencecounty=="Salt Lake County, UT", lpattern(dash) color(green) msize(vsmall)), ///
graphregion(color(white)) ylabel(,nogrid) xlabel(2018(1)2025, nogrid) ///
ytitle("Overdose Deaths per 100,000") xtitle("Year") ///
legend(order(1 "Decriminalization" 3 "Mulnomah County, OR" 2 "Recriminalization" 4 "Salt Lake County, UT") position(6) cols(2))

graph export FigureA6_multnomah_saltlake_pop_adjust.jpg, replace


*************************************************
******Running Regressions: Overdose Deaths*******
*************************************************

*****Table 2: Decriminalization Only*****
clear
use deathdata_2018-2025_clean.dta

reg deathsperhundredthousand treat*post1 treat post1 if month_num<776, cluster(county_code)
est store reg1

reg deathsperhundredthousand treat*post1 treat post1 ///
year_2019 year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 if month_num<776, cluster(county_code)
est store reg2

reg deathsperhundredthousand treat*post1 treat post1 ///
year_2019 year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 ///
month_Feb month_Mar month_Apr month_May month_Jun month_Jul month_Aug month_Sep month_Oct month_Nov month_Dec if month_num<776, ///
cluster(county_code)
est store reg3

xtset county_code
xtreg deathsperhundredthousand treat*post1 treat post1 ///
year_2019 year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 ///
month_Feb month_Mar month_Apr month_May month_Jun month_Jul month_Aug month_Sep month_Oct month_Nov month_Dec if month_num<776, ///
fe cluster(county_code)
est store reg4

esttab reg1 reg2 reg3 reg4 using Table2_decrim.tex, wrap mtitles("OD Deaths" "OD Deaths" "OD Deaths" "OD Deaths")se label star (* .10 ** .05 *** .01) replace order(treat_post1 treat post1) drop(year_* month_*) noconstant


*****Table 3: Decriminalization & Recriminalization*****
reg deathsperhundredthousand treat*post1 treat*post2 treat post1 post2, cluster(county_code)
est store reg5

reg deathsperhundredthousand treat*post1 treat*post2 treat post1 post2 ///
year_2019 year_2020 year_2021 year_2022 year_2023 year_2024 year_2025, cluster(county_code)
est store reg6

reg deathsperhundredthousand treat*post1 treat*post2 treat post1 post2 ///
year_2019 year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 ///
month_Feb month_Mar month_Apr month_May month_Jun month_Jul month_Aug month_Sep month_Oct month_Nov month_Dec, ///
cluster(county_code)
est store reg7

xtset county_code
xtreg deathsperhundredthousand treat*post1 treat*post2 treat post1 post2 ///
year_2019 year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 ///
month_Feb month_Mar month_Apr month_May month_Jun month_Jul month_Aug month_Sep month_Oct month_Nov month_Dec, ///
fe cluster(county_code)
est store reg8

esttab reg5 reg6 reg7 reg8 using Table3_decrim_recrim.tex, wrap mtitles("OD Deaths" "OD Deaths" "OD Deaths" "OD Deaths")se label star (* .10 ** .05 *** .01) replace order(treat_post1 treat_post2) drop(treat post1 post2 year_* month_*) noconstant

*****Figure 7: Coefficient Event Study*****
clear 
use deathdata_2018-2025_clean.dta


forvalues m=696(1)781{
		gen m`m'=0
		replace m`m'=1 if month_num==`m'
		gen treat_m`m'=treat*m`m'
	}

xtset county_code
xtreg deathsperhundredthousand ///
treat_m696 treat_m697 treat_m698 treat_m699 ///
treat_m700 treat_m701 treat_m702 treat_m703 treat_m704 treat_m705 treat_m706 treat_m707 treat_m708 treat_m709 ///
treat_m710 treat_m711 treat_m712 treat_m713 treat_m714 treat_m715 treat_m716 treat_m717 treat_m718 treat_m719 ///
treat_m720 treat_m721 treat_m722 treat_m723 treat_m724 treat_m725 treat_m726 treat_m727 treat_m728 treat_m729 ///
treat_m730 treat_m731 /*treat_m732*/ treat_m733 treat_m734 treat_m735 treat_m736 treat_m737 treat_m738 treat_m739 ///
treat_m740 treat_m741 treat_m742 treat_m743 treat_m744 treat_m745 treat_m746 treat_m747 treat_m748 treat_m749 ///
treat_m750 treat_m751 treat_m752 treat_m753 treat_m754 treat_m755 treat_m756 treat_m757 treat_m758 treat_m759 ///
treat_m760 treat_m761 treat_m762 treat_m763 treat_m764 treat_m765 treat_m766 treat_m767 treat_m768 treat_m769 ///
treat_m770 treat_m771 treat_m772 treat_m773 treat_m774 treat_m775 treat_m776 treat_m777 treat_m778 treat_m779 ///
treat_m780 treat_m781 ///
m696 m697 m698 m699 ///
m700 m701 m702 m703 m704 m705 m706 m707 m708 m709 ///
m710 m711 m712 m713 m714 m715 m716 m717 m718 m719 ///
m720 m721 m722 m723 m724 m725 m726 m727 m728 m729 ///
m730 m731 m732 m733 m734 m735 m736 m737 m738 m739 ///
m740 m741 m742 m743 m744 m745 m746 m747 m748 m749 ///
m750 m751 m752 m753 m754 m755 m756 m757 m758 m759 ///
m760 m761 m762 m763 m764 m765 m766 m767 m768 m769 ///
m770 m771 m772 m773 m774 m775 m776 m777 m778 m779 ///
m780 m781 ///
, fe cluster(county_code)

*****
regsave using eventstudy_death.dta, replace

clear
use eventstudy_death.dta
replace var="treat_m732" if var=="_cons"
replace coef=0 if var=="treat_m732"
replace stderr=. if var=="treat_m732"

replace var="treat_m697" if var=="o.treat_m697"
replace var="treat_m702" if var=="o.treat_m702"

egen treat=ends(var), punct(_) trim head
gen treat_dummy=0
replace treat_dummy=1 if treat=="treat"
keep if treat_dummy==1


egen month=ends(var), punct(_m) trim tail

destring month, replace

gen year_month=2018 + (month-696)/12

gen ci95_low=.
gen ci95_high=.
replace ci95_low=coef-1.96*stderr
replace ci95_high=coef+1.96*stderr


generate upper = 8
generate yline=0
sort year_month
graph twoway (area upper year_month if inrange(year_month, 2021, 2024.7), bcolor(gs14) base(-2.5)) ///
(area upper year_month if inrange(year_month, 2024.6, 2025.1), bcolor(gs11) base(-2.5)) ///
(rspike ci95_low ci95_high year_month, lcolor(black)) ///
(scatter coef year_month, msymbol(smcircle) mcolor(black)) ///
(line yline year_month, lcolor(black)), ///
graphregion(color(white)) ylabel(-2(2)8, nogrid) ytitle("") ///
xlabel(2018(1)2025, nogrid) xtitle("") ///
legend(order(1 "Decriminalization" 2 "Recriminalization") pos(6) rows(1))
graph save Figure7_eventstudy_shaded_death.gph, replace

**************************************************************************
**************************Possession Arrest Analysis**********************
**************************************************************************

****************************************************
********Creating Figures: Possession Arrests********
****************************************************
cd "/Users/clj65/BYU Law Dropbox/Cree Jones/My Mac (422-JONESC-20)/Documents/1 Research/16 Decriminalization and Death/Clean Files/"
clear
use "multnomah_crime_2018_2025_clean.dta"

collapse(sum) drugcrime distributioncrime ref_count poss_only theft murder burglary, by(ref_year_cont crime_type_num)


*****Figure 3: Full panel including pre-covid and george floyd*****

graph twoway (connected drugcrime ref_year_cont if crime_type_num==1 & ref_year_cont<2021.1, lpattern(solid) lcolor(black) color(black) msize(vsmall)) ///
(connected theft ref_year_cont if crime_type_num==2 & ref_year_cont<2021.1, lpattern(dash) lcolor(green) mcolor(green) msymbol(square) msize(vsmall)) ///
(connected drugcrime ref_year_cont if crime_type_num==1 & ref_year_cont>2021.05, lpattern(solid) lcolor(black%10) color(black%10) msize(vsmall)) ///
(connected theft ref_year_cont if crime_type_num==2 & ref_year_cont>2021.05, lpattern(dash) lcolor(green%10) mcolor(green%10) msymbol(square) msize(vsmall)) ///
(scatteri 0 2021.083 330 2021.083, recast(line) lpattern(solid) lcolor(black) msymbol(i)) ///
(scatteri 0 2020.417 330 2020.417, recast(line) lpattern(dash) lcolor(black) msymbol(i)) ///
(scatteri 0 2020.167 330 2020.167, recast(line) lpattern(dot) lcolor(black) msymbol(i)), ///
legend(position(6) order(7 "Covid" 1 "Arrests Containing a Possession Charge" 6 "George Floyd" 2 "Arrests Containing a Theft Charge" 5 "Decriminalization") cols(2)) graphregion(color(white)) xlabel(2018(1)2025,nogrid) ylabel(0(100)300,nogrid) ytitle("Number of Police Referrals") xtitle("Month")
graph export Figure3_crime_fullpanel_formatted.jpg, replace

*****Figure 4: Truncated panel excluding pre-covid and george floyd*****

graph twoway (connected drugcrime ref_year_cont if crime_type_num==1 & ref_year_cont> 2020.42 & ref_year_cont<2021.1, lpattern(solid) lcolor(black) color(black) msize(vsmall)) ///
(connected theft ref_year_cont if crime_type_num==2 & ref_year_cont> 2020.42 & ref_year_cont<2021.1, lpattern(dash) lcolor(green) mcolor(green) msymbol(square) msize(vsmall)) ///
(connected drugcrime ref_year_cont if crime_type_num==1 & ref_year_cont>2021.05, lpattern(solid) lcolor(black%10) color(black%10) msize(vsmall)) ///
(connected theft ref_year_cont if crime_type_num==2 & ref_year_cont>2021.05, lpattern(dash) lcolor(green%10) mcolor(green%10) msymbol(square) msize(vsmall)) ///
(scatteri 0 2021.083 330 2021.083, recast(line) lpattern(solid) lcolor(black) msymbol(i)), ///
legend(position(6) order(1 "Arrests Containing a Possession Charge" 2 "Arrests Containing a Theft Charge") cols(2)) graphregion(color(white)) xlabel(2021(1)2025,nogrid) ylabel(0(100)300,nogrid) ytitle("Number of Police Referrals") xtitle("Month")
graph export Figure4_crime_fullpanel_formatted_truncated.jpg, replace

*****Figure 8: Truncated panel post1*****

generate upper1=300
graph twoway (area upper1 ref_year_cont if inrange(ref_year_cont, 2021.083, 2024.6) & ref_year_cont>2020.42, bcolor(gs14) base(0)) ///
(connected drugcrime ref_year_cont if crime_type_num==1 & ref_year_cont> 2020.42 & ref_year_cont<2024.6, lpattern(solid) lcolor(black) color(black) msize(vsmall)) ///
(connected theft ref_year_cont if crime_type_num==2 & ref_year_cont> 2020.42 & ref_year_cont<2024.6, lpattern(dash) lcolor(green) mcolor(green) msymbol(square) msize(vsmall)) ///
(connected drugcrime ref_year_cont if crime_type_num==1 & ref_year_cont>2024.5, lpattern(solid) lcolor(black%10) color(black%10) msize(vsmall)) ///
(connected theft ref_year_cont if crime_type_num==2 & ref_year_cont>2024.5, lpattern(dash) lcolor(green%10) mcolor(green%10) msymbol(square) msize(vsmall)), ///
legend(position(6) order(2 "Arrests Containing a Possession Charge" 1 "Decriminalization" 3 "Arrests Containing a Theft Charge") cols(2)) graphregion(color(white)) xlabel(2021(1)2025,nogrid) ylabel(0(100)300,nogrid) ytitle("Number of Police Referrals") xtitle("Month")
graph export Figure8_crime_fullpanel_formatted_truncated_post1.jpg, replace

*****Figure 9: Truncated panel post1 post2*****

graph twoway (area upper1 ref_year_cont if inrange(ref_year_cont, 2021.083, 2024.6) & ref_year_cont>2020.42, bcolor(gs14) base(0)) ///
(area upper1 ref_year_cont if inrange(ref_year_cont, 2024.5, 2025.75) & ref_year_cont>2020.42, bcolor(gs11) base(0)) ///
(connected drugcrime ref_year_cont if crime_type_num==1 & ref_year_cont> 2020.42, lpattern(solid) lcolor(black) color(black) msize(vsmall)) ///
(connected theft ref_year_cont if crime_type_num==2 & ref_year_cont> 2020.42, lpattern(dash) lcolor(green) mcolor(green) msymbol(square) msize(vsmall)), ///
legend(position(6) order(3 "Arrests Containing a Possession Charge" 1 "Decriminalization" 4 "Arrests Containing a Theft Charge" 2 "Recriminalization") cols(2)) graphregion(color(white)) xlabel(2021(1)2025,nogrid) ylabel(0(100)300,nogrid) ytitle("Number of Police Referrals") xtitle("Month")
graph export Figure9_crime_fullpanel_formatted_truncated_post1_2.jpg, replace

****************************************************
******Running Regressions: Possession Arrests*******
****************************************************

*****Prepping Data for Regressions*****
clear
use "multnomah_crime_2018_2025_clean.dta"
gen month_ref=month(ref_date)
gen year_ref=year(ref_date)
tostring month_ref, gen(month_ref_string)
tostring year_ref, gen(year_ref_string)
gen monthcode=year_ref_string + "/" + month_ref_string

gen month_num = monthly(monthcode, "YM")
format month_num %tm

collapse(sum) drugcrime distributioncrime ref_count poss_only theft murder burglary, by(ref_year_cont month_ref year_ref month_num crime_type_num)

forvalues x=1(1)12{
	gen month_`x'=0
	replace month_`x'=1 if month_ref==`x'
}

forvalues x=2018(1)2025{
	gen year_`x'=0
	replace year_`x'=1 if year_ref==`x'
}

*Note: 
*crime_type_num=1 if drugcrime==1 & theft==0
*crime_type_num=2 if theft==1 & drugcrime==0
*crime_type_num=3 if drugcrime==1 & theft==1
*crime_type_num=4 if drugcrime==0 & theft==0
*So, next line of code keeps data if only theft, or only a drug crime

keep if crime_type_num==1 | crime_type_num==2

gen treat=.
replace treat=1 if crime_type_num==1
replace treat=0 if crime_type_num==2

gen post1=0
replace post1=1 if ref_year_cont>2021.08 & ref_year_cont<2024.65

gen post2=0
replace post2=1 if ref_year_cont>2024.65

gen treat_post1=treat*post1
gen treat_post2=treat*post2

*Dropping observations pre-George Floyd
drop if ref_year_cont<2020.42

*Save data for coefficient event study
save multnomah_crime_2018_2025_collapsed_reg.dta, replace


*****Table 4: Possession Arrests Post1*****

reg ref_count treat_post1 treat post1 if ref_year_cont<2024.65, robust
est store reg1

reg ref_count treat_post1 treat post1 ///
year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 if ref_year_cont<2024.65, robust
est store reg2

reg ref_count treat_post1 treat post1 ///
year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 ///
month_1 month_2 month_3 month_4 month_5 month_6 month_7 month_8 month_9 month_10 month_11 month_12 if ref_year_cont<2024.65, robust
est store reg3

*Note that including crime fixed effects is the same as including the treat variable, since we only have one treated crime and one control crime.

esttab reg1 reg2 reg3 using Table4_decrim_crime.tex, wrap mtitles("Arrests" "Arrests" "Arrests")se label star (* .10 ** .05 *** .01) replace order(treat_post1 treat post1) drop(year_* month_*) noconstant

*****Table 5: Possession Arrests Post1 Post2*****

reg ref_count treat_post1 treat_post2 treat post1 post2, robust
est store reg4

reg ref_count treat_post1 treat_post2 treat post1 post2 ///
year_2020 year_2021 year_2022 year_2023 year_2024 year_2025, robust
est store reg5

reg ref_count treat_post1 treat_post2 treat post1 post2 ///
year_2020 year_2021 year_2022 year_2023 year_2024 year_2025 ///
month_1 month_2 month_3 month_4 month_5 month_6 month_7 month_8 month_9 month_10 month_11 month_12, robust
est store reg6

esttab reg4 reg5 reg6 using Table5_decrim_recrim_crime.tex, wrap mtitles("Arrests" "Arrests" "Arrests")se label star (* .10 ** .05 *** .01) replace order(treat_post1 treat post1) drop(year_* month_*) noconstant

*Note that including crime fixed effects is the same as including the treat variable, since we only have one treated crime and one control crime.
